﻿using UnityEngine;
using System.Collections;

public class SoundHandler : MonoBehaviour {

	public AudioSource attack, blink, device, kill1, kill2;
	public AudioSource music, walking;
	
	public void PlayAttack() {
		attack.Play();
	}
	
	public void PlayBlink() {
		blink.Play();
	}
	
	public void PlayDevice() {
		device.Play();
	}
	
	public void PlayKill() {
		kill1.Play();
		kill2.PlayDelayed(0.5f);
	}
	
	public void ToggleMusic(bool enabled) {
		if (enabled) {
			music.Play();
		} else {
			music.Pause();
		}
	}
	
	public void ToggleWalking(bool enabled) {
		if (enabled) {
			walking.Play();
		} else {
			walking.Pause();
		}
	}
}
